package cn.walls1717.wallsmall.product.feign;

import cn.walls1717.wallsmall.common.pojo.to.es.SkuEsModel;
import cn.walls1717.wallsmall.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 远程调用ES服务
 *
 * @author walls1717
 * @since 2022/11/02 15:09
 **/
@FeignClient("wallsmall-search")
public interface SearchFeignService {

    /**
     * 将上架商品的数据写入ES中
     *
     * @param skuEsModels 上架商品数据
     * @return 是否上架成功
     */
    @PostMapping("/search/save/product")
    R productStatusUp(@RequestBody List<SkuEsModel> skuEsModels);
}
